/**
 * Created by Administrator on 2017/6/12.
 */
var Promise = require('bluebird');
var Category = Promise.promisifyAll(require('../models/category'));

//index首页
exports.index = function *(req, res) {
  var _categories = yield Category.findByLimit();
  res.render('index/index', {
    title: 'index首页',
    categories: _categories
  });
}